gtkentry: Fix text handle coordinates calculation
authorCarlos Garnacho <carlosg@gnome.org>
Tue, 29 Jan 2019 11:00:07 +0000 (12:00 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Tue, 29 Jan 2019 11:00:07 +0000 (12:00 +0100)
The text allocation is already in widget-local coordinates, involving the
GtkAllocation here is not right.

gtk/gtkentry.c

index 26fe36b1000f935bed2beddc540df96e0be63754..f5231424e4d054cda94dd1c11a22c2e4c682761d 100644 (file)
@@ -3536,12 +3536,10 @@ gtk_entry_move_handle (GtkEntry              *entry,
     }
   else
     {
-      GtkAllocation allocation;
       GdkRectangle rect;
 
-      gtk_widget_get_allocation (GTK_WIDGET (entry), &allocation);
-      rect.x = x + text_allocation.x - allocation.x;
-      rect.y = y + text_allocation.y - allocation.y;
+      rect.x = x + text_allocation.x;
+      rect.y = y + text_allocation.y;
       rect.width = 1;
       rect.height = height;